from base_analyzer import BaseAnalyzer
from consts import NOT_AVAILABLE
import db_helper

class LoadSoEntry(BaseAnalyzer):
    description = "SO加载: 启动全过程中所有SO加载"
    def get_result(self):
        start_ts = self.context['Phase1All']['start_ts']
        end_ts = self.context['Phase6All']['end_ts']
        res = db_helper.get_so_load_cost(self.cursor, start_ts, end_ts, self.thread_name)
        if not res:
            return NOT_AVAILABLE
        return res
